-- GENERATED SPELL FOR [Dr. Whitherlimb] --


function spell0_22062(pUnit, Event) --@Monstrous Elixir,Self--
pUnit:FullCastSpellOnTarget(38871,pUnit)
pUnit:RegisterEvent('Sorts_22062', 13000, 1)
end

function spell1_22062(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(21067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22062', 12500, 1)
end

function spell2_22062(pUnit, Event) --@Withering Poison,n/a--
pUnit:FullCastSpellOnTarget(38864,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22062', 1000, 1)
end

function Sorts_22062(pUnit, Event)
local choix_sorts_22062 = math.random(0, 2)
if choix_sorts_22062 == 0 then
pUnit:RegisterEvent('spell0_22062', 1, 1)
end
if choix_sorts_22062 == 1 then
pUnit:RegisterEvent('spell1_22062', 1, 1)
end
if choix_sorts_22062 == 2 then
pUnit:RegisterEvent('spell2_22062', 1, 1)
end
end

function mob22062_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22062', math.random(1500, 3000), 1)
end

function mob22062_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22062_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22062_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22062, 1, 'mob22062_Action')
RegisterUnitEvent(22062, 2, 'mob22062_Leave')
RegisterUnitEvent(22062, 3, 'mob22062_Kill')
RegisterUnitEvent(22062, 4, 'mob22062_Die')
